------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/tg2778/Dropbox/0_Reviews_RnRs/072022_JOP_Roads/v3_JOP/Replication - Roads/4_Log/13_Myopia.log
  log type:  text
 opened on:  20 Jan 2023, 16:05:14

. 
. use "1_Data/AC_pre-delim_dataset.dta", clear
(Written by R.              )

. 
. egen acstateid = concat(VD01_AC_id stateid),p("_")

. 
. global raj ""rajasthan""

. global mad ""madhya pradesh""

. global guj ""gujarat""

. global chh ""chhattisgarh""

. 
. global states "state==$raj|state==$mad|state==$guj|state==$chh"

. 
. quietly areg change_incumbentvoteshare c.totalvillconn i.rulingparty if $states, absorb(statedistrict2) cluster(acstateid)

. quietly estimates store m1

. 
. quietly areg change_incumbentvoteshare c.totalvillconn##i.rulingparty if $states, absorb(statedistrict2) cluster(acstateid)

. quietly estimates store m2

. 
. replace rulingparty = BJP
(1,548 real changes made)

. quietly areg changebjp c.totalvillconn i.rulingparty if $states, absorb(statedistrict2) cluster(acstateid)

. quietly estimates store m3

. 
. quietly areg changebjp c.totalvillconn##i.rulingparty if $states, absorb(statedistrict2) cluster(acstateid)

. quietly estimates store m4

. 
. 
. esttab m* using "2_Tables/Appendix_Table_G3_1.doc", drop(_cons) varlabel(totalvillconn "Δ connectivity" 1.rulingparty "Ruling party constituen
> cy" 1.rulingparty#c.totalvillconn "Ruling party constituency × Δ connectivity") cells(b(star fmt(3)) se(par fmt(3))) collabels(none) nomtitles
>  mgroups("Δ incumbent vote share %" "Δ BJP vote share %", pattern(1 0 1 0)) varwidth(30) modelwidth(6) substitute("\fs20" "\fs16" "\fs24" "\fs
> 20") addnote("\i{Notes:}\i0 Ruling party constituency refers to constituencies controlled by the state ruling party politician in the (1) and 
> (2) and to the BJP politician in (3) and (4). The OLS specification is the same as in main OLS results. Standard errors are clustered at the c
> onstituency level. *** p<0.001, ** p<0.01, * p<0.05") noomit nobase rtf replace
(output written to 2_Tables/Appendix_Table_G3_1.doc)

. 
. 
. *********************************************************************************
. 
. clear all

. set maxvar 5000


. use "1_Data/upboothdataset_1km.dta"

. 
. global now "allweather2011==0"

. global spwin "acwinner_sp==1"

. global bjpwin "acwinner_bjp==1"

. 
. quietly areg b_chgincvoteshare i.boothtreat201617, absorb(ac_id_09) cluster(uniqueboothid)

. quietly estimates store up1

. quietly estadd local sp "All - Full"

. 
. 
. quietly areg b_chgincvoteshare i.boothtreat201617 if $now, absorb(ac_id_09) cluster(uniqueboothid)

. quietly estimates store up2

. quietly estadd local sp "All - No all weather 2011"

. 
. 
. quietly areg b_chgincvoteshare i.boothtreat201617 if $spwin, absorb(ac_id_09) cluster(uniqueboothid)

. quietly estimates store up3

. quietly estadd local sp "SP - Full"

. 
. 
. quietly areg b_chgincvoteshare i.boothtreat201617 if $now & $spwin, absorb(ac_id_09) cluster(uniqueboothid)

. quietly estimates store up4

. quietly estadd local sp "SP - No all weather 2011"

. 
. 
. quietly areg changebjpvote i.boothtreat201617 if $bjpwin, absorb(ac_id_09) cluster(uniqueboothid)

. quietly estimates store up5

. quietly estadd local sp "BJP - Full"

. 
. 
. quietly areg changebjpvote i.boothtreat201617 if $now & $bjpwin, absorb(ac_id_09) cluster(uniqueboothid)

. quietly estimates store up6

. quietly estadd local sp "BJP - No all weather 2011"

. 
. 
. esttab up* using "2_Tables/Appendix_Table_G3_2.doc", replace rtf drop(_cons) cells(b(star fmt(3)) se(par fmt(3))) collabels(none) nomtitles mg
> roups("Δ SP vote share" "Δ BJP vote share", pattern(1 0 0 0 1 0)) varlabel(1.boothtreat201617 "Treated prior 2016" 2.boothtreat201617 "Treated
>  in 2016 or 2017") title(Voters remain unresponsive to local roads provision closer to elections in UP) substitute("\fs20" "\fs16" "\fs24" "\f
> s20") modelwidth(4 8 4 8 4 8) varwidth(20) addnote("\i{Notes:}\i0 The independent variable PMGSY beneficiary is 1 if any of the villages that 
> intersect with a 1km booth radius receives a PMGSY project before 2016, and 2 if in 2016 or 2017, and 0 otherwise. That is, the reference grou
> p includes booths that were treated before 2016 as well as not treated before 2012. Each model has a constituency fixed effect and a constant 
> that is not reported. Standard errors are clustered at the polling station level. *** p<0.001, ** p<0.01, * p<0.05") nobase noomit scalars("sp
>  Sample")
(output written to 2_Tables/Appendix_Table_G3_2.doc)

. 
. log close
      name:  <unnamed>
       log:  /Users/tg2778/Dropbox/0_Reviews_RnRs/072022_JOP_Roads/v3_JOP/Replication - Roads/4_Log/13_Myopia.log
  log type:  text
 closed on:  20 Jan 2023, 16:05:17
------------------------------------------------------------------------------------------------------------------------------------------------
